<?php
session_start();
include_once("config.php");
checkLoggedIn("yes");

?>
<html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php print $title; ?></title>
</head>
<style type="text/css">
<!--
@import url("style.css");
-->
</style>
<body>
<?php

echo "<div class=\"body\">";
doCSS();
print("Bienvenido:  <b>".$_SESSION["login"]."</b><br>\n");
print("<a href=\"logout.php"."\">Logout</a><br>");
print("<a href=\"members.php"."\">Volver</a><br>");

if ( isset($_POST["cache_trk"]) )
{

echo "<br><div class=\"titulo\">Cache para ".$_POST["cache_trk"]."</div>";
echo "<table id=\"hor-minimalist-b\" summary=\"Detalle pagos\">";
echo "<thead><tr><th scope=\"col\">Tracking</th><th scope=\"col\">Fecha</th><th scope=\"col\">Planta</th><th scope=\"col\">Pais</th><th scope=\"col\">Estado</th><th scope=\"col\">Tracking Local</th></tr></thead>";
echo "<tbody>";

$result = mysql_query("SELECT * from ".$tabla_data." where trk ='".$_POST["cache_trk"]."' order by date,trk_local", $link);
$numlineas = mysql_num_rows($result);

for ($linea = 0; $linea < $numlineas ; $linea++)
{
	echo "<tr>";
	echo "<td>".mysql_result($result,$linea,"trk")."</td><td>".mysql_result($result,$linea,"fecha")."</td><td>".mysql_result($result,$linea,"planta")."</td><td>".mysql_result($result,$linea,"pais")."</td><td>".mysql_result($result,$linea,"status")."</td><td>".mysql_result($result,$linea,"trk_local")."</td>";

	echo "</tr>";

}
echo "</tbody>";
echo "</table>";
}
echo "</div>";
?>
</body>
</html>
